!> INTERFACE : This module contains high level subroutines
!! that act as an interface between the 3D model and LACM
!! @author Dharhas Pothina
!! @created 20080929
!! @modified 20080929
!! @file lacm_interface.f90
module lacm_interface
	use lacm_globals
	use lacm_io
	implicit none
contains
	!> lacm_init : initializes lacm by reading in mesh & param files
	!! calculating river coordinates, allocating memory & all other model
	!! initialization functions
	!! @author Dharhas Pothina
	!! @param[in,out] mesh Structure containing mesh information
	!! @param[in] interp Type of interpolation. Presently only linear
	subroutine lacm_init()
		! ... read inputs ...................
	    fname = "test_mesh.in"
		call read_iodef(fname) 			!defines input/output filenames and locations
		call read_mesh(meshfile) 		!read in mesh and boundary condition?
		call read_params() 				!read in run time parameters
		! Initialize variables
		call xy2riv(mesh,'linear')		!Calculate River coordinates for each node
		! call initialize 			!initialize variables
	end subroutine lacm_init

	!> lacm_timestep : reads in 3D model variables. Does a single LACM timestep and
	!! returns modified 3D variables to 3D model
	!! @author Dharhas Pothina
	!! @param[in,out] add details about 3D VARIABLES
	!! @param[in] add Any other info lacm needs each timestep
	subroutine lacm_timestep()
	end subroutine lacm_timestep

	!> lacm_updateBC : Update 3D model BC (ie bottom drag etc)
	!! DO I NEED THIS?
	!! @author Dharhas Pothina
	!! @param[in,out] add details about 3D VARIABLES
	!! @param[in] add Any other info lacm needs each timestep
	subroutine lacm_updateBC()
	end subroutine lacm_updateBC
end module lacm_interface
